<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js">
    </script>
    <script>
        $(document).ready(function(){
            // $.ajax({
            //     type: "GET",
            //     url: "/user/getUser",
            //     data: "name=John&location=Boston",
            //     success: function(msg){
            //         alert( "response: " + msg );
            //     },
            //     error: function(msg){
            //         alert( "error: " + msg );
            //     }
            // });
            //
            //
            // $.getJSON("/user/getUser?name=John", function(json){
            //     alert("JSON Data: " + json);
            //     alert("JSON Data: " + json.name);
            // });
            $.getJSON("/user/getUsers?name=John", function(json){
                alert("JSON Data: " + json);
                alert("JSON Data: " + json[0].name);
                $.each(json, function(i,item){
                    alert(item.name);
                });
            });
        });
    </script>
</head>
<body>

<div id="div1"><h2>aaaaaaaaaa</h2></div>
<button>get</button>

</body>
</html>